using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player
{
    public Player()
    {
        _hp = 100;
    }

    private int _hp = 0;
    private bool _dead = false;

    public int Hp
    {
        get { return _hp; }
    }

    public bool Dead
    {
        get { return _dead; }
    }

    public void AddHp(int hp)
    {
        ChangeHp(hp);
    }

    public void ReduceHp(int hp)
    {
        ChangeHp(-hp);
    }

    private void ChangeHp(int hp)
    {
        _hp += hp;
        if (_hp <= 0)
        {
            _dead = true;
        }
    }

}
